﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameStateManagement
{
    class home1
    {
        
        public Texture2D main_base;
        //Color[] main_baseData;   //for pixel collision
        public int base_health;
        public Vector2 main_basePosition;
        public bool Active;
        
        public int Width
        {
        get { return main_base.Width; }
        }

        // Get the height of the player ship
        public int Height
        {
        get { return main_base.Height; }
        }

        public void Initialize(Texture2D texture, Vector2 position)
        {
            main_base = texture;

            main_basePosition.X = 362;
            main_basePosition.Y = 200;

            Active = true;

            base_health = 100;
        }

        public void Update()
        {
            if (Active == false)
                Active = true;
            
            //if (main_baseRect.Intersects(missileRect))
            //{
            //    base_health -= 5;
            //}
        }

       
        public void Draw(SpriteBatch spriteBatch)
        {

            if (Active == true)
                spriteBatch.Draw(main_base, main_basePosition, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
            //spriteBatch.Draw(main_base, main_baseRect, Color.White);   //for box collision
            //spriteBatch.DrawString(basefont, " HEALTH: " + base_health, new Vector2(400 - basefont.MeasureString(" HEALTH: " + base_health).X / 2, 50), Color.Black);
        }
    }
}

